.multi-session-chat-container {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.chat-header {
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  padding: 0 24px;
  height: 64px;
  line-height: 64px;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.header-content h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.multi-session-layout {
  flex: 1;
  height: calc(100vh - 64px);
}

.session-manager {
  background: #fafafa;
  border-right: 1px solid #f0f0f0;
}

.session-manager-content {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.session-manager-header {
  padding: 16px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.session-manager-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.session-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.section-header {
  padding: 8px 16px;
  font-size: 12px;
  color: #666;
  display: flex;
  align-items: center;
  gap: 8px;
}

.session-items {
  padding: 0 8px;
}

.session-item {
  display: flex;
  align-items: center;
  padding: 16px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 8px;
  border: 1px solid #f3f4f6;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.session-item:hover {
  background: #f8fafc;
  border-color: #e5e7eb;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.session-item.active {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #38bdf8;
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.15);
}

.session-item.pinned {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #f59e0b;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
  position: relative;
}

.session-item.pinned::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, #f59e0b, #d97706);
  border-radius: 4px 0 0 4px;
}

.session-item-content {
  flex: 1;
  min-width: 0;
}

.session-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #1f2937;
  line-height: 1.4;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pinned-badge {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  margin-right: 8px;
  animation: pinned-badge-pulse 2s infinite;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
  position: relative;
  z-index: 1;
}

@keyframes pinned-badge-pulse {
  0%, 100% {
    box-shadow: 0 1px 3px rgba(245, 158, 11, 0.3);
  }
  50% {
    box-shadow: 0 1px 6px rgba(245, 158, 11, 0.5);
  }
}

.session-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.3;
  position: relative;
}

.session-status {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #1890ff;
  font-weight: 500;
  font-size: 11px;
  padding: 2px 6px;
  background: rgba(24, 144, 255, 0.08);
  border-radius: 8px;
  border: 1px solid rgba(24, 144, 255, 0.2);
  animation: session-status-pulse 2s infinite;
}

@keyframes session-status-pulse {
  0%, 100% {
    background: rgba(24, 144, 255, 0.08);
    border-color: rgba(24, 144, 255, 0.2);
  }
  50% {
    background: rgba(24, 144, 255, 0.12);
    border-color: rgba(24, 144, 255, 0.3);
  }
}

.session-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s;
}

.session-item:hover .session-actions {
  opacity: 1;
}

.empty-sessions {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
}

.empty-content {
  text-align: center;
}

.empty-icon {
  font-size: 48px;
  color: #d9d9d9;
  margin-bottom: 16px;
}

.multi-session-content {
  background: #fff;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.session-windows-container {
  height: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: flex-start;
  gap: 16px;
  padding: 16px;
  overflow-y: auto;
  max-width: 100%;
}

.session-window {
  width: 400px;
  height: 500px;
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s;
}

.session-window.maximized {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: auto;
  height: auto;
  z-index: 1000;
  border-radius: 0;
  box-shadow: none;
}

.session-window-header {
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fafafa;
  border-radius: 8px 8px 0 0;
}

.window-title {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.window-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #52c41a;
  font-weight: 500;
  padding: 4px 8px;
  background: rgba(82, 196, 26, 0.1);
  border-radius: 12px;
  border: 1px solid rgba(82, 196, 26, 0.2);
  animation: window-status-pulse 2s infinite;
}

@keyframes window-status-pulse {
  0%, 100% {
    background: rgba(82, 196, 26, 0.1);
    border-color: rgba(82, 196, 26, 0.2);
  }
  50% {
    background: rgba(82, 196, 26, 0.15);
    border-color: rgba(82, 196, 26, 0.3);
  }
}

.window-actions {
  display: flex;
  gap: 4px;
}

.session-window-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.messages-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.message {
  margin-bottom: 16px;
}

.message-left {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.message-right {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: flex-end;
}

.message-avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: #f0f0f0;
  border: 2px solid transparent;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.message-left .message-avatar {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: #5a6fd8;
}

.message-right .message-avatar {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  border-color: #e4556a;
}

.wechat-avatar {
  font-size: 22px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.ai-avatar {
  font-size: 22px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.message-content {
  max-width: 70%;
  padding: 12px;
  border-radius: 8px;
  position: relative;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.message-left .message-content {
  background: #ffffff;
  color: #000;
  border: 1px solid #e0e0e0;
  border-top-left-radius: 2px;
}

.message-right .message-content {
  background: #95ec69;
  color: #000;
  border-top-right-radius: 2px;
}

.message-image img {
  max-width: 200px;
  max-height: 200px;
  border-radius: 6px;
}

.message-file {
  display: flex;
  align-items: center;
  gap: 8px;
}

.message-text {
  line-height: 1.5;
}

.message-content-html {
  line-height: 1.5;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* 表格样式 */
.message-content-html table {
  border: 1px solid #ddd;
  border-collapse: collapse;
  width: 100%;
  margin: 10px 0;
  font-size: 14px;
}

.message-content-html th {
  border: 1px solid #ddd;
  padding: 8px;
  background-color: #f5f5f5;
  text-align: left;
  font-weight: 600;
}

.message-content-html td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}

.message-content-html tr:nth-child(even) {
  background-color: #f9f9f9;
}

.message-content-html tr:hover {
  background-color: #f0f0f0;
}

.streaming-text {
  position: relative;
}

.streaming-cursor {
  animation: blink 1s infinite;
}

.streaming-status {
  display: flex;
  align-items: center;
  margin-top: 8px;
  padding: 4px 8px;
  background-color: rgba(76, 175, 80, 0.1);
  border-radius: 12px;
  font-size: 12px;
  color: #4CAF50;
}

.streaming-dot {
  width: 6px;
  height: 6px;
  background-color: #4CAF50;
  border-radius: 50%;
  margin-right: 6px;
  animation: pulse 1.5s infinite;
}

.streaming-text {
  font-weight: 500;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

@keyframes pulse {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.1); }
  100% { opacity: 1; transform: scale(1); }
}

.message-footer {
  margin-top: 4px;
  font-size: 11px;
  opacity: 0.7;
}

.message-left .message-footer {
  text-align: left;
}

.message-right .message-footer {
  text-align: right;
}

.loading-message {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  color: #666;
}

/* TRAE风格输入区域 */
.input-area.trae-style {
  border-top: 1px solid #f0f0f0;
  padding: 16px;
  background: #fafafa;
}

.input-container {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: white;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.message-input {
  flex: 1;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  resize: none;
  min-height: 40px;
  max-height: 120px;
  padding: 8px 12px;
  font-size: 14px;
  line-height: 1.5;
}

.message-input:focus {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

.action-buttons {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
}

.upload-btn,
.send-btn,
.search-btn {
  border: none !important;
  box-shadow: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.upload-btn:hover {
  background: #f0f0f0 !important;
  color: #1890ff !important;
}

.search-btn {
  background: transparent !important;
  color: #666 !important;
}

.search-btn:hover {
  background: #f0f0f0 !important;
  color: #1890ff !important;
}

.search-btn.active {
  background: #1890ff !important;
  color: white !important;
}

.search-btn.disabled {
  background: #f5f5f5 !important;
  color: #d9d9d9 !important;
  cursor: not-allowed !important;
}

.search-btn.disabled:hover {
  background: #f5f5f5 !important;
  color: #d9d9d9 !important;
}

.search-icon {
  font-size: 14px;
  transition: all 0.2s ease;
}

.search-icon.active {
  filter: brightness(0) invert(1);
}

.search-icon.disabled {
  color: #d9d9d9 !important;
}

.send-btn {
  background: #1890ff !important;
  color: white !important;
}

.send-btn:hover:not(:disabled) {
  background: #40a9ff !important;
  transform: scale(1.05);
}

.send-btn:disabled {
  background: #d9d9d9 !important;
  color: #bfbfbf !important;
  cursor: not-allowed;
}

/* 文件预览区域样式 */
.file-preview-area {
  margin-bottom: 12px;
}

.file-preview-item {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
  border: 1px solid #e8e8e8;
  transition: all 0.3s ease;
}

.file-preview-item:hover {
  border-color: #1890ff;
  box-shadow: 0 2px 8px rgba(24, 144, 255, 0.1);
}

.image-preview, .file-preview {
  display: flex;
  align-items: center;
  gap: 12px;
}

.preview-container {
  position: relative;
  cursor: pointer;
  border-radius: 6px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.preview-container:hover {
  transform: scale(1.02);
}

.preview-image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
}

.file-icon {
  font-size: 24px;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
  border-radius: 6px;
  color: #666;
}

.preview-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.preview-container:hover .preview-overlay {
  opacity: 1;
}

.preview-text {
  color: white;
  font-size: 12px;
  font-weight: 500;
}

.file-info {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.file-name {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.download-btn, .remove-btn {
  border: none !important;
  box-shadow: none !important;
  padding: 4px 8px !important;
  height: auto !important;
  font-size: 12px !important;
  border-radius: 4px !important;
  transition: all 0.3s ease !important;
}

.download-btn {
  background: #1890ff !important;
  color: white !important;
}

.download-btn:hover {
  background: #40a9ff !important;
  transform: scale(1.05);
}

.remove-btn {
  background: #ff4d4f !important;
  color: white !important;
}

.remove-btn:hover {
  background: #ff7875 !important;
  transform: scale(1.05);
}

.no-active-sessions {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
}

.welcome-message {
  text-align: center;
}

.welcome-message h2 {
  margin-bottom: 16px;
  color: #333;
}

.welcome-message p {
  margin-bottom: 8px;
  line-height: 1.5;
}

/* 删除按钮美化样式 */
.delete-btn {
  border: none !important;
  box-shadow: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  transition: all 0.3s ease;
  color: #666 !important;
}

.delete-btn:hover {
  background: #ff4d4f !important;
  color: white !important;
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(255, 77, 79, 0.3) !important;
}

.delete-btn:active {
  transform: scale(0.95);
}

/* 删除按钮工具提示美化 */
.delete-btn::after {
  content: attr(title);
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1000;
}

.delete-btn:hover::after {
  opacity: 1;
}

/* 可点击图片样式 */
.clickable-image {
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 4px;
  max-width: 300px;
  max-height: 200px;
  object-fit: cover;
}

.clickable-image:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 图片预览模态框样式 */
.image-preview-modal .ant-modal-body {
  background: #f8f9fa;
}

.image-preview-modal .ant-modal-body img {
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* 关闭按钮样式 */
.close-preview-btn {
  background: rgba(0, 0, 0, 0.6) !important;
  border: 2px solid rgba(255, 255, 255, 0.8) !important;
  color: white !important;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.close-preview-btn:hover {
  background: rgba(0, 0, 0, 0.8) !important;
  border-color: white !important;
  transform: scale(1.1);
}

.close-preview-btn .anticon {
  font-size: 14px;
}

/* 模态框头部样式 */
.image-preview-modal .ant-modal-header {
  border-bottom: none;
  padding: 16px 24px 0;
}

.image-preview-modal .ant-modal-close {
  top: 16px;
  right: 16px;
}

.image-preview-modal .ant-modal-close-x {
  width: 36px;
  height: 36px;
  line-height: 36px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  color: white;
}

.image-preview-modal .ant-modal-close-x:hover {
  background: rgba(0, 0, 0, 0.8);
}